{% extends 'web/sharedSpace.html' %}
{% load static %}

{% block detailcontent %}
<table class="mytable" id="mytable">
    <thead style="width: 100%;">
        <tr>
            <!-- key = ['src_ID', 'filename', 'username', 'upload_time', 'size', 'num_stars' ] -->
            <td style="width: 50%;">名称</td>
            <td style="width: 30%;">修改时间</td>
            <td style="width: 20%;">大小</td>
        </tr>
    </thead>
    <tbody>
        {% for file in filesList %}
        <tr>
            <!-- 文件名 -->
            <td data-path="{{ file.path }}" data-type="{{ file.type }}" onclick="check(this)">
                {% if file.type == '文件夹' %}
                <ion-icon
                    name="folder-outline"
                    style="margin-right: 5px"
                ></ion-icon>
                {% else %}
                <ion-icon
                    name="document-text-outline"
                    style="margin-right: 5px"
                ></ion-icon>
                {% endif %}
                <span> {{ file.name }}</span>
            </td>
            <!-- 上传时间 -->
            <td>
                <span class="unhoverspan">{{ file.m_time }}</span>
                <span class="hoverspan">
                    <a class="link" data-id="{{ file.src_path }}" data-type="{{ file.type }}" onclick="download(this)"><ion-icon name="download-outline"></ion-icon></a>
                    <a class="link"><ion-icon name="heart-outline" data-type="{{ file.type }}" onclick="like(this)"></ion-icon></a>
                </span>
            </td>
            <!-- 大小 -->
            <td>
                <span> {{ file.size }}</span>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock detailcontent %}